package com.test.deencredit.analytics_deencredit.data_sdk_deencredit.services_deencredit;

import android.content.Context;

import com.google.gson.Gson;
import com.test.deencredit.analytics_deencredit.data_sdk_deencredit.beans_deencredit.ASStoreBn_deencredit;
import com.test.deencredit.analytics_deencredit.data_sdk_deencredit.util_deencredit.ASStoreUtil_deencredit;
import com.test.deencredit.analytics_deencredit.data_sdk_deencredit.util_deencredit.ASUtil_deencredit;

public class ASStoeIfo_deencredit {

    public static ASStoreBn_deencredit getDatas_deencredit(final Context paramContext) {
        ASStoreBn_deencredit bean = new ASStoreBn_deencredit();
        try {
            bean.setContainSd_deencredit(ASStoreUtil_deencredit.getContainSD_deencredit());
            bean.setRamCanUse_deencredit(ASStoreUtil_deencredit.getRamCanUse_deencredit(paramContext));
            bean.setRamTotal_deencredit(ASStoreUtil_deencredit.getRamTotal_deencredit(paramContext));
            bean.setCashCanUse_deencredit(ASStoreUtil_deencredit.getCashCanUse_deencredit(paramContext));
            bean.setCashTotal_deencredit(ASStoreUtil_deencredit.getCashTotal_deencredit(paramContext));
            bean.setExtraSD_deencredit(ASStoreUtil_deencredit.getExtraSD_deencredit(paramContext, 1));
            bean.setInternalTotal_deencredit(ASStoreUtil_deencredit.getTotalInternalStoreSize_deencredit(paramContext));
            bean.setInternalAvailable_deencredit(ASStoreUtil_deencredit.getAvailaInternalStoreSize_deencredit(paramContext));
            bean.setRamDidUsed_deencredit(ASStoreUtil_deencredit.getRamDidUsed_deencredit(paramContext));
            bean.setCashDidUsed_deencredit(ASStoreUtil_deencredit.getCashDidUsed_deencredit(paramContext));
            bean.setSdCardTotal_deencredit(ASStoreUtil_deencredit.getSDCardTotal_deencredit(paramContext));
        } catch (Exception e) {
            e.printStackTrace();
        }
        return bean;
    }

    public static String getZipString_deencredit(Context paramContext) {
        String zipString = "";
        try {
            ASStoreBn_deencredit infoBean = getDatas_deencredit(paramContext);
            String result = new Gson().toJson(infoBean).trim();
            zipString = ASUtil_deencredit.stringToGZIP_deencredit(result);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return zipString;
    }

}
